Basic Operation of User Management
2015/03/21 |
[1] | Add a FreeIPA user account. |
[root@dlp ~]# ipa user-add cent --first=CentOS --last=Linux --password Password: Enter Password again to verify: ----------------- Added user "cent" ----------------- User login: cent First name: CentOS Last name: Linux Full name: CentOS Linux Display name: CentOS Linux Initials: CL Home directory: /home/cent GECOS field: CentOS Linux Login shell: /bin/bash Kerberos principal: cent@SRV.WORLD Email address: cent@srv.world UID: 1781800001 GID: 1781800001 Password: True Kerberos keys available: True |
[2] | Lock or unlock a FreeIPA user. |
[root@dlp ~]# ipa user-disable cent ---------------------------- Disabled user account "cent" ---------------------------- [root@dlp ~]# ipa user-enable cent --------------------------- Enabled user account "cent" --------------------------- |
[3] | Search a FreeIPA user. |
[root@dlp ~]# ipa user-find cent -------------- 1 user matched -------------- User login: cent First name: CentOS Last name: Linux Home directory: /home/cent Login shell: /bin/bash Email address: cent@srv.world UID: 1781800001 GID: 1781800001 Account disabled: False Password: True Kerberos keys available: True ---------------------------- Number of entries returned 1 ----------------------------[root@dlp ~]# ipa user-show --raw cent uid: cent givenname: CentOS sn: Linux homedirectory: /home/cent loginshell: /bin/bash mail: cent@srv.world uidnumber: 1781800001 gidnumber: 1781800001 nsaccountlock: False has_password: True has_keytab: True |
[4] | Delete a FreeIPA user. |
[root@dlp ~]# ipa user-del cent ------------------- Deleted user "cent" ------------------- |
[5] | Add a FreeIPA group. |
[root@dlp ~]# ipa group-add --desc='Development Group' development ------------------------- Added group "development" ------------------------- Group name: development Description: Development Group GID: 1781800006 |
[6] | Add members in a FreeIPA group. |
[root@dlp ~]# ipa group-add-member --users=redhat,ubuntu development Group name: development Description: Development Group GID: 1781800006 Member users: redhat, ubuntu ------------------------- Number of members added 2 ------------------------- |
[7] | Add a group in a FreeIPA group. |
[root@dlp ~]# ipa group-add-member --groups=development hiroshima Group name: hiroshima Description: State Group GID: 1781800007 Member groups: development ------------------------- Number of members added 1 ------------------------- |
[8] | Search a FreeIPA group. |
[root@dlp ~]# ipa group-find development --------------- 1 group matched --------------- Group name: development Description: Development Group GID: 1781800006 Member users: redhat, ubuntu Member of groups: hiroshima ---------------------------- Number of entries returned 1 ---------------------------- |
[9] | Delete a FreeIPA group. |
[root@dlp ~]# ipa group-del hiroshima ------------------------- Deleted group "hiroshima" ------------------------- |